package com.mjw.tender.controller;

import com.mjw.tender.api.CategoryService;
import com.mjw.tender.dto.ResponseResult;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/categories")
public class CategoryController {

    @Reference(version = "1.0.0")
    CategoryService categoryService;

    @GetMapping("/")
    public ResponseResult getAll(){
        return new ResponseResult(ResponseResult.CodeStatus.OK,categoryService.getAll());
    }
}
